
# 此实例示意初始化方法的用法

class MyList:
    # 定义一个初始化方法
    def __init__(self, *args, **kwargs):
        print("self:", self)
        print('初始化方法被调用！args:', args, 'kwargs:', kwargs)
    pass

L1 = list()
L2 = list('ABCD')
print(L1, L2)

# M1 = MyList()
M2 = MyList('ABCD')
# print(M1, M2)
M3 = MyList(100, 200, a=300, b=400)

